package com.situ.mall.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.mall.pojo.entity.Cart;
import com.situ.mall.pojo.vo.CartListVO;

public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

	int isHave(Cart cart);

	int addQuantity(Cart cart);

	List<CartListVO> selectByUser(Integer id);

	int updateQuantity(@Param(value = "productId")Integer productId, @Param(value = "quantity")Integer quantity, @Param(value = "id")Integer id);

    int updateStatus(@Param(value = "cartId") Integer cartId, @Param(value = "checked") Integer checked);

    int updateStatusAll(@Param(value = "userId") Integer userId, @Param(value = "checkedall") Integer checkedall);

    List<CartListVO> selectCheckByUser(Integer id);

    int deleteByUserCheck(Integer userId);
}